cmake_minimum_required(VERSION 3.8.2)

PROJECT (camrgb_jpeg_enc)

SET(SRC
	main.c
	aiq_control.cpp
    camrgb_control.c
    rga_control.c
	encode_control.c
    vpu_encode.c
)

SET(LIB rga pthread rockchip_mpp rkaiq rkisp_api)

add_definitions(-DCAMERA_ENGINE_RKAIQ)
include_directories(./)
include_directories(${CMAKE_SYSROOT}/usr/include/rkaiq/algos)
include_directories(${CMAKE_SYSROOT}/usr/include/rkaiq/common)
include_directories(${CMAKE_SYSROOT}/usr/include/rkaiq/iq_parser)
include_directories(${CMAKE_SYSROOT}/usr/include/rkaiq/uAPI)
include_directories(${CMAKE_SYSROOT}/usr/include/rkaiq/xcore)
message(STATUS "CMAKE_SYSROOT directory: ${CMAKE_SYSROOT}")

ADD_EXECUTABLE(camrgb_jpeg_enc ${SRC})
target_link_libraries(camrgb_jpeg_enc ${LIB})

install(TARGETS camrgb_jpeg_enc DESTINATION bin)
